<template>
  <router-view v-slot="{ Component }">
    <keep-alive v-if="Component">
      <component :is="Component" :key="$route.name" v-if="$route.meta.keepAlive"></component>
    </keep-alive>
    <component :is="Component" :key="$route.name" v-if="!$route.meta.keepAlive"></component>
  </router-view>
</template>

<script>

export default {
  name: 'App',
  components: {
    // pageA
  },
  setup(){
    // const Component = ref('pageA');
    // return {Component}
  }
}
</script>

<style>
body {
  margin: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  overflow: hidden;
  padding-top: 80px;
}
</style>
